Telegram Group & Telegram Channel
12. Program to Calculate Mean.

import java.util.Scanner;

class CalculateMean
{

public static void main(String[] args)
{

int sum = 0, inputNum;
int counter;
float mean;
Scanner NumScanner = new Scanner(System.in);

System.out.println("Enter the total number of terms whose mean you want to calculate");

counter = NumScanner.nextInt();

System.out.println("Please enter " + counter + " numbers:");

for (int x = 1; x <= counter; x++)
{
inputNum = NumScanner.nextInt();
sum = sum + inputNum;
System.out.println();
}

mean = sum / counter;
System.out.println("The mean of the " + counter + " numbers you entered is " + mean);
}
}

@java_codings



tg-me.com/java_codings/21
Create:
Last Update:

12. Program to Calculate Mean.

import java.util.Scanner;

class CalculateMean
{

public static void main(String[] args)
{

int sum = 0, inputNum;
int counter;
float mean;
Scanner NumScanner = new Scanner(System.in);

System.out.println("Enter the total number of terms whose mean you want to calculate");

counter = NumScanner.nextInt();

System.out.println("Please enter " + counter + " numbers:");

for (int x = 1; x <= counter; x++)
{
inputNum = NumScanner.nextInt();
sum = sum + inputNum;
System.out.println();
}

mean = sum / counter;
System.out.println("The mean of the " + counter + " numbers you entered is " + mean);
}
}

@java_codings

BY Advance Java πŸ‘¨β€πŸ’»


Warning: Undefined variable $i in /var/www/tg-me/post.php on line 283

Share with your friend now:
tg-me.com/java_codings/21

View MORE
Open in Telegram


Advance Java ‍ Telegram | DID YOU KNOW?

Date: |

Why Telegram?

Telegram has no known backdoors and, even though it is come in for criticism for using proprietary encryption methods instead of open-source ones, those have yet to be compromised. While no messaging app can guarantee a 100% impermeable defense against determined attackers, Telegram is vulnerabilities are few and either theoretical or based on spoof files fooling users into actively enabling an attack.

How to Use Bitcoin?

n the U.S. people generally use Bitcoin as an alternative investment, helping diversify a portfolio apart from stocks and bonds. You can also use Bitcoin to make purchases, but the number of vendors that accept the cryptocurrency is still limited. Big companies that accept Bitcoin include Overstock, AT&T and Twitch. You may also find that some small local retailers or certain websites take Bitcoin, but you’ll have to do some digging. That said, PayPal has announced that it will enable cryptocurrency as a funding source for purchases this year, financing purchases by automatically converting crypto holdings to fiat currency for users. β€œThey have 346 million users and they’re connected to 26 million merchants,” says Spencer Montgomery, founder of Uinta Crypto Consulting. β€œIt’s huge.”

Advance Java ‍ from ua


Telegram Advance Java πŸ‘¨β€πŸ’»
FROM USA